package com.huqing.icu.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.huqing.icu.enums.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * 房源实体类
 *
 * @author huqing
 * @date 2024-06-19 21:28
 */
@TableName(value = "house")
@Data
public class House implements Serializable {

    /******************************  房子的基本信息  ************************************/
    @TableId("id")
    @Schema(name = "id", description = "主键ID")
    private Long id;

    @Schema(name = "userId", description = "用户id")
    private Long userId;

    @Schema(name = "title", description = "标题")
    private String title;

    @Schema(name = "description", description = "房子介绍")
    private String description;

    @Schema(name = "area", description = "房子面积")
    private BigDecimal area;

    @Schema(name = "floor", description = "房子楼层")
    private Integer floor;

    @Schema(name = "totalFloor", description = "房子总楼层")
    private Integer totalFloor;

    @Schema(name = "buildYear", description = "房子的建造时间，必须是整数，单位为年")
    private Integer buildYear;

    /**
     * @see HouseTypeEnum
     */
    @Schema(name = "houseType", description = "房子类型 1-自建房 2-城中村 3-公寓 4-普通小区 5-高档小区 6-大别墅")
    private Integer houseType;

    /**
     * @see HouseDirectionEnum
     */
    @Schema(name = "direction", description = "朝向")
    private Integer direction;

    /**
     * @see IsOrNotEnum
     */
    @Schema(name = "isShareRent", description = "是否合租 0-否(整租) 1-是(合租)")
    private Integer isShareRent;

    /**
     * @see IsOrNotEnum
     */
    @Schema(name = "isLoft", description = "是否为复式 0-否 1-是")
    private Integer isLoft;

    @Schema(name = "rootNum", description = "房间数量")
    private Integer rootNum;

    @Schema(name = "hallNum", description = "厅数量")
    private Integer hallNum;

    @Schema(name = "toiletNum", description = "卫生间数量")
    private Integer toiletNum;

    /**
     * @see IsOrNotEnum
     */
    @Schema(name = "isLongRental", description = "是否支持长租 0-否(短租) 1-是(长租)")
    private Integer isLongRental;

    @Schema(name = "rentMonthNum", description = "可短租几个月")
    private Integer rentMonthNum;


    /******************************  房子的位置  ************************************/

    @Schema(name = "houseCommunityName", description = "小区名字")
    private String houseCommunityName;

    @Schema(name = "province", description = "省")
    private String province;

    @Schema(name = "city", description = "市")
    private String city;

    @Schema(name = "district", description = "区")
    private String district;


    /******************************  房子的设施  ************************************/
    /**
     * @see IsOrNotEnum
     */
    @Schema(name = "hasElevator", description = "是否有电梯 0-否 1-是")
    private Integer hasElevator;

    /**
     * @see IsOrNotEnum
     */
    @Schema(name = "hasBed", description = "是否有床 0-否 1-是")
    private Integer hasBed;

    /**
     * @see IsOrNotEnum
     */
    @Schema(name = "hasWardrobe", description = "是否有衣柜 0-否 1-是")
    private Integer hasWardrobe;

    /**
     * @see IsOrNotEnum
     */
    @TableField("has_tv")
    @Schema(name = "hasTV", description = "是否有电视 0-否 1-是")
    private Integer hasTV;

    /**
     * @see IsOrNotEnum
     */
    @Schema(name = "hasAirConditioning", description = "是否有空调 0-否 1-是")
    private Integer hasAirConditioning;

    /**
     * @see IsOrNotEnum
     */
    @Schema(name = "hasFridge", description = "是否有冰箱 0-否 1-是")
    private Integer hasFridge;

    /**
     * @see IsOrNotEnum
     */
    @Schema(name = "hasWashingMachine", description = "是否有洗衣机 0-否 1-是")
    private Integer hasWashingMachine;

    /**
     * @see IsOrNotEnum
     */
    @Schema(name = "hasNaturalGas", description = "是否有天然气 0-否 1-是")
    private Integer hasNaturalGas;

    /**
     * @see IsOrNotEnum
     */
    @Schema(name = "hasWaterHeater", description = "是否有热水器 0-否 1-是")
    private Integer hasWaterHeater;


    /******************************  房子的视频和图片  ************************************/


    @Schema(name = "imageListStr", description = "房子的图片列表")
    private String imageListStr;

    @Schema(name = "videoUrl", description = "房子的视频")
    private String videoUrl;


    /******************************  房子的价格相关：水电、业务、押金、停车费等  ************************************/


    /**
     * @see HouseWaterElectricityTypeEnum
     */
    @Schema(name = "waterElectricityType", description = "水电类型 1-自定义 2-民水民电 3-商水商电")
    private Integer waterElectricityType;

    @Schema(name = "waterPrice", description = "水的价格")
    private BigDecimal waterPrice;

    @Schema(name = "electricityPrice", description = "电的价格")
    private BigDecimal electricityPrice;

    @Schema(name = "propertyManageFee", description = "物业费或管理费")
    private BigDecimal propertyManageFee;

    @Schema(name = "agencyPrice", description = "中介费")
    private BigDecimal agencyPrice;

    @Schema(name = "rentPrice", description = "租金")
    private BigDecimal rentPrice;

    @Schema(name = "deposit", description = "押金")
    private BigDecimal deposit;

    @Schema(name = "hasPark", description = "是否有停车位 0-否 1-是")
    private Integer hasPark;

    @Schema(name = "monthParkPrice", description = "月保停车费用")
    private BigDecimal monthParkPrice;


    /******************************  房东的信息  ************************************/


    @Schema(name = "houseOwner", description = "房东身份 1-转租租客 2-中介 3-二手房东 4-业主(一手房东)")
    private Integer houseOwner;

    @Schema(name = "contactStr", description = "联系方式：微信号或手机号")
    private String contactStr;

    /**
     * @see IsOrNotEnum
     */
    @Schema(name = "是否公开联系方式", description = "0-否(谁申请了谁能看) 1-是")
    private Integer isOpenConcat;


    /******************************  房子的状态相关：审核状态、是否上架/下架  ************************************/

    /**
     * @see HouseDownStatusEnum
     */
    @Schema(name = "downStatus", description = "是否下架 0-否 1-是")
    private Integer downStatus;

    /**
     * @see HouseDownReasonEnum
     */
    @Schema(name = "downReasonType", description = "下架原因")
    private Integer downReasonType;

    @Schema(name = "downReason", description = "下架原因")
    private String downReason;

    @Schema(name = "isTop", description = "是否置顶 0-否 1-是")
    private Integer isTop;


    /******************************  房子的时间相关：创建时间、发布时间  ************************************/

    @Schema(name = "publishTime", description = "发布时间")
    private Timestamp publishTime;

    /**
     * @see com.huqing.icu.enums.DeleteStatusEnum
     */
    @Schema(name = "isDeleted", description = "是否已删除 0-否 1-是")
    @TableLogic
    private Integer isDeleted;

    @Schema(name = "createTime", description = "创建时间")
    private Timestamp createTime;

    @Schema(name = "modifyTime", description = "修改时间")
    private Timestamp modifyTime;
}
